﻿using System;
using System.Data.Entity.Design.PluralizationServices;
using System.Globalization;
using DNT.RavenQA.Core.Extensions;

namespace DNT.RavenQA.Web.Infrastructure.Extensions
{
    public static class StringExtensions
    {
        private static readonly PluralizationService Service =
            PluralizationService.CreateService(CultureInfo.GetCultureInfo("en-us"));

        public static String Pluralize(this String source)
        {
            source.EnsureIsNotNullOrEmpty("source");
            return Service.Pluralize(source);
        }
    }
}